<?php

class Core_Form_Admin_Settings_General_Cache extends Core_Form_Admin_Settings_Base
{
	protected function _init()
	{
		$this -> setMeta(array(
				'name' => 'form_settings_cache',
				'title' => 'cache settings',
				'desc' => ''
		));
		
		$this -> addChild('@radio', 'site_cache_enabled', array(
				'multiOptions' => array(
						'on' => 'yes',
						'off' => 'no'
				),
				'value' => 'on',
				'label' => 'cache enable',
		));

		$this -> addChild('@radio', 'site_cache_adapter', array(
				'multiOptions' => array(
						'file' => 'file based',
						'apc' => 'apc cache',
						'memcache' => 'mem cache',
				),
				'label' => 'cache adapter',
		));

		$this -> addChild('@title', 'site_cache_lifetime', array(
				'value' => 300,
				'label' => 'cache lifetime',
		));
		
		$this -> addChild('@title', 'site_cache_file-dir', array(
				'value' => '',
				'label' => 'cache dir',
		));

		$this -> addChild('@radio', 'site_cache_file-locking', array(
				'value' => 1,
				'multiOptions' => array(
						'on' => 'yes',
						'off' => 'no'
				),
				'label' => 'file locking',
		));

		$this -> addChild('@title', 'site_cache_memcache-host', array(
				'value' => '127.0.0.1',
				'label' => 'memcache host',
		));

		

		$this -> addChild('@title', 'site_cache_memcache-port', array(
				'label' => 'memcache port',
				'value' => '2121',
		));

		$this -> addChild('@radio', 'site_cache_memcache-compression', array(
				'value' => '2121',
				'multiOptions' => array(
						'on' => 'yes',
						'off' => 'no'
				),
				'label' => 'memcache compresion',
		));

		$this -> addChild('@group', 'buttons');

		$this -> buttons -> addChild('@submit', '_submit') -> addChild('@cancel', '_canel');
	}

}
